#include "Image.h"
#include <iostream>

using namespace std;
void Image::setColor(int x, int y, Color c)
{
	pic[3*x*w+3*y]=(unsigned char)(c.getR()*255);
	pic[3*x*w+3*y+1]=(unsigned char)(c.getG()*255);
	pic[3*x*w+3*y+2]=(unsigned char)(c.getB()*255);
}

Image::Image(int w,int h)
{
	this->w=w;
	this->h=h;
	pic=new unsigned char[3*w*h*sizeof(unsigned char)];
}
